Repository navigation
Fail the exporter with a clear error when the run image is missing from the daemon - #1760
Merged
Merged
Conversation
…om the daemon Signed-off-by: YuMin Kim <yuminkim.dev@gmail.com>
jabrown85
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In daemon mode,
exporternow fails withrun image "<ref>" not found in daemonwhen the run image is not in the daemon. Before, it failed later with the misleadingget run image top layer SHA: image has no layers.local.NewImageleaves the base image unset when the daemon returns NotFound for the run image.Identifier()then returns an empty ID and a nil error, so the check ininitDaemonAppImagepassed and the export continued with an empty image.initDaemonAppImagenow checksappImage.Found()right afterlocal.NewImage, the same wayrebaserandrestorerdo.I did not use the read-access check that was suggested in the issue (like the analyze phase). In daemon mode
AccessChecker()inplatform/lifecycle_inputs.gois a no-op, so it would not catch a missing image.Test: a unit test in
cmd/lifecycleuses a fake docker client whose daemon has no images. It fails onmain(Expected an error but got nil) and passes with this change. I did not add an acceptance test, since those need Docker and run in CI.Release notes
When the run image is missing from the daemon,
exporternow fails with an error naming the run image instead ofimage has no layers.Related
Resolves #1456
Context
Verified locally:
go testfor all non-acceptance packages passes, andgolangci-lint run --new-from-rev=origin/mainreports 0 issues. Acceptance tests were not run.